{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "4b83a093",
   "metadata": {},
   "outputs": [],
   "source": [
    "import nest_asyncio\n",
    "nest_asyncio.apply()\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "11bd24fe",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO:     Started server process [89133]\n",
      "INFO:     Waiting for application startup.\n",
      "INFO:     Application startup complete.\n",
      "INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Starting Smart Server...\n",
      "Static files directory: /Users/jan/Desktop/smart_env_test_parent/smart_env_test/smart_server/static\n",
      "Static files available: True\n",
      "API endpoints available at: http://0.0.0.0:8000/api/\n",
      "INFO:     127.0.0.1:62473 - \"GET / HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62473 - \"GET /assets/index-B7b9lzIp.js HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62474 - \"GET /assets/index-BkbTg7Wt.css HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62473 - \"GET /favicon.ico HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62526 - \"OPTIONS /api/generate-tree HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62526 - \"POST /api/generate-tree HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62527 - \"GET /assets/zoom-D-7OjcR6.js HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62528 - \"GET /assets/index-DUkSHv68.js HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62528 - \"GET /assets/index-DpUQfgVv.js HTTP/1.1\" 200 OK\n",
      "INFO:     127.0.0.1:62547 - \"POST /api/generate-tree HTTP/1.1\" 200 OK\n"
     ]
    }
   ],
   "source": [
    "from smart_server import SmartServer\n",
    "\n",
    "# 创建服务器实例（指定前端文件目录）\n",
    "server = SmartServer()\n",
    "\n",
    "# 运行服务器\n",
    "server.run(host=\"0.0.0.0\", port=8000)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "3693bfbe",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "venv",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
